package main

import (
	"encoding/xml"
	"fmt"
)

var str = `	<?xml version="1.0" encoding="UTF-8"?>
	<wsdl:definitions targetNamespace="http://webservice.sasis.com" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://webservice.sasis.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
	  <wsdl:types>
	<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://webservice.sasis.com">
	<xsd:element name="queryPsgForFOC">
	<xsd:complexType>
	<xsd:sequence>
	<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string"/>
	</xsd:sequence>
	</xsd:complexType>
	</xsd:element>
	<xsd:element name="queryPsgForFOCResponse">
	<xsd:complexType>
	<xsd:sequence>
	<xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="xsd:string"/>
	</xsd:sequence>
	</xsd:complexType>
	</xsd:element>
	</xsd:schema>
	  </wsdl:types>
	  <wsdl:message name="queryPsgForFOCRequest">
	    <wsdl:part name="parameters" element="tns:queryPsgForFOC"/>
	  </wsdl:message>
	  <wsdl:message name="queryPsgForFOCResponse">
	    <wsdl:part name="parameters" element="tns:queryPsgForFOCResponse"/>
	  </wsdl:message>
	  <wsdl:portType name="StatsPsgForFOCServicePortType">
	    <wsdl:operation name="queryPsgForFOC">
	      <wsdl:input name="queryPsgForFOCRequest" message="tns:queryPsgForFOCRequest"/>
	      <wsdl:output name="queryPsgForFOCResponse" message="tns:queryPsgForFOCResponse"/>
	    </wsdl:operation>
	  </wsdl:portType>
	  <wsdl:binding name="StatsPsgForFOCServiceHttpBinding" type="tns:StatsPsgForFOCServicePortType">
	    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
	    <wsdl:operation name="queryPsgForFOC">
	      <wsdlsoap:operation soapAction=""/>
	      <wsdl:input name="queryPsgForFOCRequest">
	        <wsdlsoap:body use="literal"/>
	      </wsdl:input>
	      <wsdl:output name="queryPsgForFOCResponse">
	        <wsdlsoap:body use="literal"/>
	      </wsdl:output>
	    </wsdl:operation>
	  </wsdl:binding>
	  <wsdl:service name="StatsPsgForFOCService">
	    <wsdl:port name="StatsPsgForFOCServiceHttpPort" binding="tns:StatsPsgForFOCServiceHttpBinding">
	      <wsdlsoap:address location="http://127.0.0.1:8080/sasis/services/StatsPsgForFOCService"/>
	    </wsdl:port>
	  </wsdl:service>
	</wsdl:definitions>`

type Response struct {
	XMLName xml.Name          `xml:"definitions"`
	Types   ResopnseTypes     `xml:"types"`
	Message []ResopnseMessage `xml:"message"`
}
type ResopnseTypes struct {
	XMLName xml.Name         `xml:"types"`
	Schema  []ResopnseSchema `xml:"schema"`
}

type ResopnseSchema struct {
	XMLName xml.Name `xml:"schema"`
	Element []string `xml:"name"`
}

type ResopnseMessage struct {
	XMLName xml.Name `xml:"message"`
	PartStr string   `xml:"part"`
}

func main() {
	v := Response{}
	err := xml.Unmarshal([]byte(str), &v)
	if err != nil {
		fmt.Println(err)
	}
	fmt.Println("===", v.Types.Schema[0].Element)
}
